#include <iostream>
#include <algorithm>
#include <cstring>

using namespace std;
const int N = 1e5 + 10;

int n;
int q[N], tr[N], p[N];
int res[N];

int lowbit(int x){
    return (-x) & x;
}

void add(int x, int k){
    for(int i = x; i <= n; i += lowbit(i)) tr[i] += k;
}

int f(int x){
    int res = 0;
    for(int i = x; i > 0; i -= lowbit(i)) res += tr[i];
    return res;
}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);

    scanf("%d", &n);
    for(int i = 2; i <= n; i ++) scanf("%d", &q[i]);

    for(int i = 1; i <= n; i ++){
        p[i] = 1;
        add(i, 1);
    }

    for(int i = n; i >= 2; i --){
        int l = 1, r = n;
        while(l < r){
            int mid = (l + r) >> 1;
            if(f(mid) >= q[i] + 1) r = mid;
            else l = mid + 1;
        }
        res[i] = l;
        p[l] = 0;
        add(l, -1);
    }

    for(int i = 1; i <= n; i ++){
        if(p[i] == 1){
            res[1] = i;
            break;
        }
    }

    for(int i = 1; i <= n; i ++){
        printf("%d\n", res[i]);
    }

    return 0;
}